package com.igeekhome.wzgl.service.impl;

import com.igeekhome.wzgl.entity.AdministratorEntity;
import com.igeekhome.wzgl.mapper.IAdministratorMapper;
import com.igeekhome.wzgl.service.IAdministrator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdministratorImpl implements IAdministrator {
    @Autowired
    private IAdministratorMapper iAdministratorMapper;

    @Override
    public int regist(AdministratorEntity re) {
        return iAdministratorMapper.regist(re);
    }

    @Override
    public int isCanUse(String account) {
        return iAdministratorMapper.isCanUse(account);
    }

    @Override
    public AdministratorEntity login(AdministratorEntity ad) {
        return iAdministratorMapper.login(ad);
    }

    @Override
    public int addAdministrator(AdministratorEntity admin) {
        return iAdministratorMapper.addAdministrator(admin);
    }

    @Override
    public int delete(int id) {
        return iAdministratorMapper.delete(id);
    }

    @Override
    public int updata(AdministratorEntity ad) {
        return iAdministratorMapper.updata(ad);
    }

    @Override
    public List<AdministratorEntity> search(int id) {
        return iAdministratorMapper.search(id);
    }

    @Override
    public List<AdministratorEntity> page() {
        return iAdministratorMapper.page();
    }

    @Override
    public AdministratorEntity getById(int id) {
        return iAdministratorMapper.getById(id);
    }
}
